package org.gd.hellospring.simple;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SimpleTest {

    public static void main(String...as) {


        String s1 = new String("10");
        String s2 = "10";

        System.out.println(s1 == s2);

//        ApplicationContext context = new ClassPathXmlApplicationContext("simple/context.xml");
//        SimpleDaoLocal dao = context.getBean("simpleDao", SimpleDaoLocal.class);
//        System.out.println(dao.getUser().getId());
//        System.out.println(dao.getUser().getName());
//
//        System.out.println(dao.getDefUser().getId());
//        System.out.println(dao.getDefUser().getName());
//
//
//        SimpleDaoLocal newDao = context.getBean("newSimpleDao", SimpleDaoLocal.class);
//        System.out.println(newDao.getDefUser().getId());
//        System.out.println(newDao.getDefUser().getName());
//
//        SimpleDaoLocal annotateSimpleBean = context.getBean("annotateSimpleBean", SimpleDaoLocal.class);
//        System.out.println(annotateSimpleBean.getDefUser().getId());
//        System.out.println(annotateSimpleBean.getDefUser().getName());
//
//        SimpleDaoLocal daoFactory = context.getBean("daoFactory", SimpleDaoLocal.class);
//        System.out.println(daoFactory.getUser().getId());
//        System.out.println(daoFactory.getUser().getName());
    }
}
